package cn.common;

import org.apache.log4j.Logger;

public class ConfigOption {
	private static ConfigOption configOption = null;
	
	private String fileurl;
	private String templateurl;
	private String weburl;

	private String superadmin;
	private String suppwd;

	public synchronized static void init() {
		if (configOption == null) {
			configOption = new ConfigOption();
		}
		PropertyManager pm = new PropertyManager("config.properties");
		configOption.setFileurl(pm.get("fileurl"));
		configOption.setTemplateurl(pm.get("templateurl"));
		configOption.setWeburl(pm.get("weburl"));
		
		configOption.setSuperadmin(pm.get("superadmin"));
		configOption.setSuppwd(pm.get("suppwd"));
	}

	public static ConfigOption getInstance() {
		if (configOption == null) {
			init();
		}
		return configOption;
	}

	public String getFileurl() {
		return fileurl;
	}

	public void setFileurl(String fileurl) {
		this.fileurl = fileurl;
	}

	public String getTemplateurl() {
		return templateurl;
	}

	public void setTemplateurl(String templateurl) {
		this.templateurl = templateurl;
	}

	public String getWeburl() {
		return weburl;
	}

	public void setWeburl(String weburl) {
		this.weburl = weburl;
	}

	public String getSuperadmin() {
		return superadmin;
	}

	public void setSuperadmin(String superadmin) {
		this.superadmin = superadmin;
	}

	public String getSuppwd() {
		return suppwd;
	}

	public void setSuppwd(String suppwd) {
		this.suppwd = suppwd;
	}

	
}
